function FilterRoutes(routes, idcard) {
    let filterArr = routes.filter(item => {
        if (item.auth && item.auth.includes(idcard)) {
            // 递归出口条件
            item.children && item.children.forEach(items => {
                item.children = FilterRoutes(item.children, idcard)
            })
            return true
        }
    })

    return filterArr
}

export {
    FilterRoutes
}